Skip to content

Conversation

raghavyuva
Copy link
Owner

@raghavyuva raghavyuva commented Sep 20, 2025

Summary by CodeRabbit

  • New Features

    • Extensions hub: browse, search, sort, filter, paginate, view details, install/run, fork via YAML editor, remove forks.
    • Execution management: start runs, view executions and live/paginated logs, cancel running executions.
    • Many ready-to-use deployment and fail2ban templates; templates gallery and per-extension pages.
  • Documentation

    • New Extensions spec and usage guide.
  • Localization

    • Added Extensions and shared UI translations across multiple locales.
  • Refactor

    • Pagination now shown only when multiple pages exist.

Copy link
Contributor

coderabbitai bot commented Sep 20, 2025

Walkthrough

Adds a complete "extensions" feature: new domain models, YAML parser/validator, pluggable execution engine modules, storage/service/controller layers, DB migrations and loader, many templates, routes and RBAC, frontend pages/components/hooks, RTK Query slice and types, i18n entries, view dependency, and API version timestamp bump.

Changes

Cohort / File(s) Summary
API Version Metadata
api/api/versions.json
Updated v1 release_date timestamp.
Domain Types
api/internal/types/extension.go
Added extension domain models, enums, spec and listing types.
Parser / Validation
api/internal/features/extension/parser/*
YAML parser, types, directory loader and extensive validation logic (parse/validate/convert).
Engine Registry & Modules
api/internal/features/extension/engine/*
Module registry and modules: command, file, service, user, docker, docker_compose, plus var-substitution helper.
Storage (Bun)
api/internal/features/extension/storage/storage.go
Bun-backed storage layer: transactions, CRUD for extensions/variables/executions/steps/logs, listing, pagination, next-sequence.
Loader & Store Init
api/internal/features/extension/loader/loader.go, api/internal/storage/store.go
Template loader, upsert logic, and store initialization wiring to import templates.
Service & Executor
api/internal/features/extension/service/*
ExtensionService with CRUD, fork, run orchestration, executor, logging, cancellation, RunContext and rollback/compensation handling.
Controller Layer
api/internal/features/extension/controller/*
ExtensionsController and endpoints: list/get/categories/run/fork/cancel/logs/executions/delete; parse/validate helpers.
Validation Helper
api/internal/features/extension/validation/validator.go
Validator wrapper (go-playground) with ParseRequestBody stub and ValidateRequest.
Routes & Permissions
api/internal/routes.go, api/internal/features/supertokens/auth.go
Route wiring under /extensions, RBAC/Audit middleware application, added extension permissions.
Migrations
api/migrations/extensions/*, api/migrations/audit/*, api/migrations/feature-flags/*
DB enums/tables/indexes/triggers for extensions, variables, executions, steps, logs; added extension_type, parent_extension_id, log_seq; audit enum and feature-flag migrations.
Templates Catalog
api/templates/*
Many new extension templates (deploy-*, fail2ban.yaml, etc.).
Docs
docs/extensions/index.md
New spec documentation describing phases, step types and examples.
Frontend: Redux / API / Types
view/redux/*, view/redux/types/extension.ts
EXTENSIONURLS enum, extensionsApi RTK Query slice and hooks, TypeScript types, store wiring.
Frontend: Pages / Components / Hooks
view/app/extensions/**/*, view/app/extensions/[id]/*
Listing & detail pages, hero/header/grid/card, category badges, fork/run dialogs, input modal, logs/overview tabs, hooks useExtensions / useExtensionInput.
Frontend: UI / Editor / ACE
view/components/ui/ace-editor.tsx
Exposed AceEditorProps, converted AceEditor to forwardRef wrapper.
Frontend: Navigation, RBAC & Sidebar
view/components/layout/app-sidebar.tsx, view/lib/rbac.ts
Added Extensions nav item and extensions resource to RBAC union.
Frontend: i18n
view/lib/i18n/locales/{en,es,fr,kn,ml}.json
Added extensions namespaces, new common keys (installed, cancel, delete, readMore, readLess), navigation label.
Frontend: Layout / Pagination behavior
view/app/containers/page.tsx, view/app/self-host/.../list-repositories.tsx
Render pagination only when totalPages > 1.
Frontend: New UI components
view/app/extensions/components/*
Multiple new components: ExtensionCard, ExtensionsGrid, ExtensionsHeader, ExtensionsHero, CategoryBadges, ExtensionForkDialog, ExtensionInput, Overview/Executions tabs, Logs UI.
Frontend: Hook libs
view/app/extensions/hooks/*
useExtensions, useExtensionInput hooks for listing and run-modal management.
Frontend: Redux store wiring
view/redux/store.ts
Registered extensionsApi.reducerPath and included its middleware.
View dependency
view/package.json
Added dependency yaml@^2.5.1.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User (Browser)
  participant FE as Frontend
  participant API as API Router
  participant C as ExtensionsController
  participant S as ExtensionService
  participant ST as Storage (DB)

  U->>FE: Navigate /extensions
  FE->>API: GET v1/extensions?...
  API->>C: GetExtensions
  C->>S: ListExtensions(params)
  S->>ST: ListExtensions(params)
  ST-->>S: ExtensionListResponse
  S-->>C: ExtensionListResponse
  C-->>API: 200 JSON
  API-->>FE: 200 JSON
Loading
sequenceDiagram
  autonumber
  participant U as User
  participant FE as Frontend
  participant API as API Router
  participant C as ExtensionsController
  participant S as ExtensionService
  participant ST as Storage
  participant ENG as Engine

  U->>FE: Run extension (vars / file)
  FE->>API: POST v1/extensions/{id}/run
  API->>C: RunExtension
  C->>S: StartRun(extension_id, vars)
  S->>ST: GetExtensionByID
  ST-->>S: Extension + Spec
  S->>ST: CreateExecution + CreateExecutionSteps
  Note over S: async background execution started
  par Background execution
    S->>ENG: executeRun(spec, vars)
    loop for each step
      ENG-->>S: output, (optional) compensation
      S->>ST: UpdateStep / CreateExtensionLog
    end
    S->>ST: UpdateExecution(status)
  end
  C-->>API: 200 Execution created
  API-->>FE: 200 JSON
Loading
sequenceDiagram
  autonumber
  participant FE as Frontend
  participant API as API Router
  participant C as ExtensionsController
  participant S as ExtensionService
  participant ST as Storage

  FE->>API: GET v1/extensions/execution/{id}/logs?after_seq=...
  API->>C: ListExecutionLogs
  C->>S: ListExecutionLogs(id, after, limit)
  S->>ST: ListExtensionLogs(...)
  ST-->>S: Logs[]
  S-->>C: Logs + next_after
  C-->>API: 200 {logs,next_after}
  API-->>FE: 200 JSON
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Possibly related PRs

Suggested labels

nixopus-docker, ui

Poem

In burrows of code I hop and play,
I stitch YAML steps and logs all day.
Forks take root and containers hum,
Steps run, then rollback—compensations come.
Hooray—extensions shipped! 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “feat: extensions” succinctly highlights the primary change by indicating the addition of the new extensions feature set across the application, matching the extensive implementation of extension support in API, internal services, client UI, templates, and migrations. It clearly conveys the main purpose of this large changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0baec5b and 54c82ae.

⛔ Files ignored due to path filters (1)
  • view/public/plugin.png is excluded by !**/*.png
📒 Files selected for processing (94)
  • api/api/versions.json (1 hunks)
  • api/internal/features/extension/controller/delete_extension.go (1 hunks)
  • api/internal/features/extension/controller/fork_extension.go (1 hunks)
  • api/internal/features/extension/controller/get_extensions.go (1 hunks)
  • api/internal/features/extension/controller/init.go (1 hunks)
  • api/internal/features/extension/controller/run_extension.go (1 hunks)
  • api/internal/features/extension/engine/command.go (1 hunks)
  • api/internal/features/extension/engine/common.go (1 hunks)
  • api/internal/features/extension/engine/docker.go (1 hunks)
  • api/internal/features/extension/engine/docker_compose.go (1 hunks)
  • api/internal/features/extension/engine/file.go (1 hunks)
  • api/internal/features/extension/engine/package.go (1 hunks)
  • api/internal/features/extension/engine/registry.go (1 hunks)
  • api/internal/features/extension/engine/service.go (1 hunks)
  • api/internal/features/extension/engine/user.go (1 hunks)
  • api/internal/features/extension/loader/loader.go (1 hunks)
  • api/internal/features/extension/parser/parse.go (1 hunks)
  • api/internal/features/extension/parser/types.go (1 hunks)
  • api/internal/features/extension/parser/validate.go (1 hunks)
  • api/internal/features/extension/service/context.go (1 hunks)
  • api/internal/features/extension/service/executor.go (1 hunks)
  • api/internal/features/extension/service/run_extension.go (1 hunks)
  • api/internal/features/extension/service/service.go (1 hunks)
  • api/internal/features/extension/storage/storage.go (1 hunks)
  • api/internal/features/extension/validation/validator.go (1 hunks)
  • api/internal/features/supertokens/auth.go (2 hunks)
  • api/internal/routes.go (3 hunks)
  • api/internal/storage/store.go (2 hunks)
  • api/internal/types/extension.go (1 hunks)
  • api/migrations/audit/035_add_extensions_to_audit_up.sql (1 hunks)
  • api/migrations/extensions/036_create_extensions_down.sql (1 hunks)
  • api/migrations/extensions/036_create_extensions_up.sql (1 hunks)
  • api/migrations/extensions/037_add_extension_type_down.sql (1 hunks)
  • api/migrations/extensions/037_add_extension_type_up.sql (1 hunks)
  • api/migrations/extensions/038_add_parent_extension_id_down.sql (1 hunks)
  • api/migrations/extensions/038_add_parent_extension_id_up.sql (1 hunks)
  • api/migrations/extensions/039_add_extension_logs_down.sql (1 hunks)
  • api/migrations/extensions/039_add_extension_logs_up.sql (1 hunks)
  • api/migrations/feature-flags/034_add_extensions_feature_flag_down.sql (1 hunks)
  • api/migrations/feature-flags/034_add_extensions_feature_flag_up.sql (1 hunks)
  • api/templates/deploy-appwrite.yaml (1 hunks)
  • api/templates/deploy-beszel.yaml (1 hunks)
  • api/templates/deploy-blocky.yaml (1 hunks)
  • api/templates/deploy-code-server.yaml (1 hunks)
  • api/templates/deploy-dashdot.yaml (1 hunks)
  • api/templates/deploy-dashy.yaml (1 hunks)
  • api/templates/deploy-dozzle.yaml (1 hunks)
  • api/templates/deploy-excalidraw.yaml (1 hunks)
  • api/templates/deploy-filebrowser.yaml (1 hunks)
  • api/templates/deploy-firefly-iii.yaml (1 hunks)
  • api/templates/deploy-homer.yaml (1 hunks)
  • api/templates/deploy-linkding.yaml (1 hunks)
  • api/templates/deploy-minio.yaml (1 hunks)
  • api/templates/deploy-myspeed.yaml (1 hunks)
  • api/templates/deploy-ollama.yaml (1 hunks)
  • api/templates/deploy-postgres.yaml (1 hunks)
  • api/templates/deploy-redis.yaml (1 hunks)
  • api/templates/deploy-semaphore.yaml (1 hunks)
  • api/templates/deploy-slash.yaml (1 hunks)
  • api/templates/deploy-speedtest-tracker.yaml (1 hunks)
  • api/templates/deploy-stirling-pdf.yaml (1 hunks)
  • api/templates/deploy-uptime-kuma.yaml (1 hunks)
  • api/templates/deploy-url-to-png.yaml (1 hunks)
  • api/templates/fail2ban.yaml (1 hunks)
  • docs/extensions/index.md (1 hunks)
  • view/app/containers/page.tsx (1 hunks)
  • view/app/extensions/[id]/components/LogsTab.tsx (1 hunks)
  • view/app/extensions/[id]/components/OverviewTab.tsx (1 hunks)
  • view/app/extensions/[id]/loading.tsx (1 hunks)
  • view/app/extensions/[id]/page.tsx (1 hunks)
  • view/app/extensions/components/category-badges.tsx (1 hunks)
  • view/app/extensions/components/extension-card.tsx (1 hunks)
  • view/app/extensions/components/extension-fork-dialog.tsx (1 hunks)
  • view/app/extensions/components/extension-input.tsx (1 hunks)
  • view/app/extensions/components/extensions-grid.tsx (1 hunks)
  • view/app/extensions/components/extensions-header.tsx (1 hunks)
  • view/app/extensions/components/extensions-hero.tsx (1 hunks)
  • view/app/extensions/hooks/use-extension-input.ts (1 hunks)
  • view/app/extensions/hooks/use-extensions.ts (1 hunks)
  • view/app/extensions/page.tsx (1 hunks)
  • view/app/self-host/components/github-repositories/list-repositories.tsx (1 hunks)
  • view/components/layout/app-sidebar.tsx (3 hunks)
  • view/components/ui/ace-editor.tsx (3 hunks)
  • view/lib/i18n/locales/en.json (3 hunks)
  • view/lib/i18n/locales/es.json (2 hunks)
  • view/lib/i18n/locales/fr.json (2 hunks)
  • view/lib/i18n/locales/kn.json (2 hunks)
  • view/lib/i18n/locales/ml.json (2 hunks)
  • view/lib/rbac.ts (1 hunks)
  • view/package.json (1 hunks)
  • view/redux/api-conf.ts (1 hunks)
  • view/redux/services/extensions/extensionsApi.ts (1 hunks)
  • view/redux/store.ts (3 hunks)
  • view/redux/types/extension.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@raghavyuva raghavyuva changed the base branch from master to feat/develop September 20, 2025 10:26
@raghavyuva raghavyuva changed the base branch from feat/develop to master September 20, 2025 10:28
@raghavyuva raghavyuva changed the base branch from master to feat/develop September 20, 2025 10:28
@raghavyuva raghavyuva self-assigned this Sep 20, 2025
@raghavyuva raghavyuva added this to the Beta Release milestone Sep 20, 2025
@raghavyuva
Copy link
Owner Author

@coderabbitai summary and short title

Copy link
Contributor

coderabbitai bot commented Sep 20, 2025

@raghavyuva I'll regenerate the summary and short title for this PR about extensions functionality.

✅ Actions performed

Summary regeneration triggered.

@raghavyuva raghavyuva marked this pull request as draft September 20, 2025 10:35
@zhravan zhravan deleted the branch master October 3, 2025 12:21
@zhravan zhravan closed this Oct 3, 2025
@github-project-automation github-project-automation bot moved this to Done in Nixopus Oct 3, 2025
@zhravan zhravan reopened this Oct 4, 2025
@raghavyuva raghavyuva changed the base branch from feat/develop to master October 13, 2025 12:30
@raghavyuva raghavyuva marked this pull request as ready for review October 13, 2025 12:30
coderabbitai[bot]

This comment was marked as outdated.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
view/lib/i18n/locales/es.json (1)

1319-1348: Critical: layout is incorrectly nested under navigation.

"layout" must be a top‑level key (see FR/KN). Current nesting will break i18n lookups.

Apply:

   "navigation": {
     "dashboard": "Panel de Control",
     "selfHost": "Autoalojado",
     "fileManager": "Gestor de Archivos",
     "extensions": "Extensiones",
     "settings": "Configuración",
     "general": "General",
     "notifications": "Notificaciones",
     "team": "Equipo",
     "domains": "Dominios",
-    "containers": "Contenedores",
-    "layout": {
-      "breadcrumbs": {
-        "home": "Inicio",
-        "dashboard": "Panel de Control",
-        "selfHost": "Autoalojado",
-        "fileManager": "Gestor de Archivos",
-        "settings": "Configuración",
-        "general": "General",
-        "notifications": "Notificaciones",
-        "team": "Equipo",
-        "domains": "Dominios",
-        "update": "Actualizar",
-        "containers": "Contenedores"
-      },
-      "terminal": {
-        "togglePosition": "Cambiar Posición del Terminal (Ctrl+T)"
-      }
-    }
+    "containers": "Contenedores"
   },
+  "layout": {
+    "breadcrumbs": {
+      "home": "Inicio",
+      "dashboard": "Panel de Control",
+      "selfHost": "Autoalojado",
+      "fileManager": "Gestor de Archivos",
+      "settings": "Configuración",
+      "general": "General",
+      "notifications": "Notificaciones",
+      "team": "Equipo",
+      "domains": "Dominios",
+      "update": "Actualizar",
+      "containers": "Contenedores"
+    },
+    "terminal": {
+      "togglePosition": "Cambiar Posición del Terminal (Ctrl+T)"
+    }
+  },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b03319 and 4c3db53.

📒 Files selected for processing (6)
  • api/api/versions.json (1 hunks)
  • api/internal/features/supertokens/auth.go (2 hunks)
  • view/lib/i18n/locales/en.json (3 hunks)
  • view/lib/i18n/locales/es.json (2 hunks)
  • view/lib/i18n/locales/fr.json (2 hunks)
  • view/lib/i18n/locales/kn.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • view/lib/i18n/locales/en.json
🔇 Additional comments (10)
api/api/versions.json (2)

13-13: LGTM.

No functional change here.


6-6: Validate RFC3339Nano support across consumers
Your jq test shows fromdateiso8601 fails on nine-digit fractional seconds and non-Z offsets. Ensure every client or library parsing release_date accepts this format. If not, normalize timestamps to RFC3339 (≤3 decimal places) and UTC Z.

api/internal/features/supertokens/auth.go (3)

60-60: LGTM! Read-only access appropriate for member role.

The extension read permission added to the member role correctly follows the principle of least privilege, granting read-only access consistent with the existing member permission pattern.


65-65: LGTM! Read-only access appropriate for viewer role.

The extension read permission added to the viewer role is correct, maintaining the least privileged access level consistent with the viewer role's purpose.


46-46: Extension endpoints RBAC enforcement confirmed The /extensions routes use middleware.RBACMiddleware("extension"), which maps HTTP methods to extension:read/create/update/delete.

view/lib/i18n/locales/kn.json (1)

16-20: Common additions look good.

Comma after preview present; JSON valid.

view/lib/i18n/locales/fr.json (3)

16-20: Resolved: trailing comma after preview.

JSON now valid.


1268-1314: Extensions namespace complete.

Includes run and noVariables; keys align with other locales.


1319-1320: Navigation entry added correctly.

navigation.extensions present and consistent.

view/lib/i18n/locales/es.json (1)

15-19: Common additions OK.

Comma after preview present; JSON valid.

@raghavyuva
Copy link
Owner Author

@coderabbitai pause

Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

✅ Actions performed

Reviews paused.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@raghavyuva raghavyuva changed the base branch from master to feat/develop October 15, 2025 17:10
@raghavyuva raghavyuva changed the base branch from feat/develop to master October 15, 2025 17:10
@raghavyuva
Copy link
Owner Author

@coderabbitai summary

Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

✅ Actions performed

Summary regeneration triggered.

@raghavyuva raghavyuva merged commit cab5029 into master Oct 15, 2025
4 checks passed
@raghavyuva raghavyuva deleted the feat/extensions branch October 16, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants